package analiseSemantica;

    public class BinaryExpr {
        BinaryExpr binaryExprRef = null;
        UnaryExpr unaryExprRef = null;
        Binop binopRef = null;   // agrupa a segunda regra de binaryExpr
        public int line;
        public BinaryExpr(Object ob) {
            if (ob instanceof UnaryExpr)
            this.unaryExprRef = (UnaryExpr) ob ;
        }


        public BinaryExpr( Object ob ,   Object ob2 ,   Object ob3) {
            
           
            if ( ob instanceof BinaryExpr)
            this.binaryExprRef = (BinaryExpr)ob;
        
            if(ob2 instanceof Binop)
                 this.binopRef = (Binop) ob2;
            
            
            if(ob3 instanceof UnaryExpr)
                this.unaryExprRef = (UnaryExpr) ob3 ; 
        }

        
        
        public BinaryExpr getBinaryExprRef() {
            return binaryExprRef;
        }

        public void setBinaryExprRef(BinaryExpr binaryExprRef) {
            this.binaryExprRef = binaryExprRef;
        }

        public Binop getBinopRef() {
            return binopRef;
        }

        public void setBinopRef(Binop binopRef) {
            this.binopRef = binopRef;
        }

        public UnaryExpr getUnaryExprRef() {
            return unaryExprRef;
        }

        public void setUnaryExprRef(UnaryExpr unaryExprRef) {
            this.unaryExprRef = unaryExprRef;
        }




        


    }

